/*
* $Id: ViewInspects.h lexus $
*
* Copyright 2009 by Volokitin Alexey
* All rights reserved
*
*/
#ifndef _VIEW_INSPECT_H_
#define _VIEW_INSPECT_H_

#include "ViewTable.h"

class CViewInspect : public CViewTable, public ISubscriber
{
	CDateTimeCtrl m_dateFrom;
	CDateTimeCtrl m_dateTo;
	time_t m_tDateFrom;
	time_t m_tDateTo;
	CButton m_showButton;
protected:
	CTableRegion m_inspectRegion;
protected:
	virtual void PaintView(CDC* dc, CRect rect);
	virtual void ResizeTableRegion(CRect rect);
	virtual void Init();
	void InitInspect();
	time_t GetTimeFrom();
	time_t GetTimeTo();
	void SetManipulation(JournalEnum::typeItemMnpl type, int nId);
public:
	CViewInspect(CState* pState);
	virtual ~CViewInspect();
public:
	virtual bool IsViewState(State state);
	virtual void SetState();
	virtual void EventHandler();
protected:
	DECLARE_MESSAGE_MAP();
	afx_msg void OnPaint();
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnDestroy();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnTimer(UINT_PTR);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg BOOL OnSetCursor(CWnd*, UINT, UINT);
	afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
	afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
	afx_msg void OnShowButton();
	afx_msg void OnDeleteInspect();
	afx_msg void OnAddInspect();
	afx_msg void OnChangeInspect();
};

#endif/*_VIEW_INSPECT_H_*/